/**
@description: Sum the digits of a given number without using loop.
@author: timlentse(tinglenxan@gmail.com)
@Date: 2014-11-05 
*/
public class SumDigits { 
        int sumDigits(int no) {
  return no == 0 ? 0 : no%10 + sumDigits(no/10) ;
 }

 public static void main(String s[]) {
  int Number = Integer.parseInt(s[0]);
  System.out.println((new SumDigits()).sumDigits(Number));
 }

}